﻿Public Class XSCSongList

    Private Sub XSCSongList_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        ''A-2009-10-11
        'If GetAppSettingConfig("BrowserOtherUserData") <> "1" Then
        '    Me.MyDataGridViewPage1.UserNameValue = Me.strName
        '    Me.MyDataGridViewPage1.UserName = "USERNAME"
        '    Me.MyDataGridViewPage1.BrowserData = False
        'End If
        ''A-2009-10-11
        Dim dt As New DataTable
        dt.Columns.Add("id")
        dt.Columns.Add("TITLE")
        Dim dif As New IO.DirectoryInfo(IO.Path.Combine(Me.GetCurrentDirectory(), "Song"))
        Try
            If dif IsNot Nothing Then
                For Each fif As IO.FileInfo In dif.GetFiles("*.*")
                    dt.Rows.Add(New String() {IO.Path.GetFileNameWithoutExtension(fif.Name), IO.Path.GetFileNameWithoutExtension(fif.Name)})
                Next
            End If
        Catch ex As Exception

        End Try
        
        'Dim strSql_1 As String = "select Song as id,song as TITLE  from  XSCSong  Where 1=1 "
        'strSql_1 &= " ORDER BY OPTIME DESC"

        'Dim strSql1_1 As String = "select count(*) as PageCount from XSCSong  Where 1=1  "
        'A-2009-12-20
        Me.MyDataGridViewPage1.SetDataSource(dt, 1)
    End Sub


End Class
